// { "framework": "Vue"} 

/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 488);
/******/ })
/************************************************************************/
/******/ ({

/***/ 287:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var brand = {
  primary: '#ff6600',
  warning: '#e39334',
  success: '#5cb85c',
  danger: '#d9534f'
};
module.exports = {
  tabbar: {
    selectedColor: brand.primary,
    color: '#333'
  },
  brand: brand,
  color: {
    default: '#474747',
    primary: brand.primary,
    gray: '#555'
  }
};

/***/ }),

/***/ 370:
/***/ (function(module, exports) {

module.exports = {
  "switch": {
    "width": "96",
    "backgroundColor": "#ff6600",
    "height": "52",
    "borderRadius": "52",
    "position": "relative",
    "alignItems": "center",
    "overflow": "hidden",
    "borderStyle": "solid",
    "borderWidth": "1",
    "borderColor": "#dddddd"
  },
  "switch-handler": {
    "width": "96",
    "height": "50",
    "borderRadius": "50",
    "position": "absolute",
    "top": 0,
    "left": 0,
    "paddingRight": "2",
    "backgroundColor": "#ffffff",
    "transform": "translateX(-46px)",
    "flexDirection": "row",
    "alignItems": "center",
    "justifyContent": "flex-end"
  },
  "switch-handler-circle": {
    "width": "46",
    "height": "46",
    "borderRadius": "46",
    "backgroundColor": "#ffffff",
    "borderStyle": "solid",
    "borderWidth": 1,
    "borderColor": "#dddddd",
    "boxShadow": "0px 0px 2px rgba(0, 0, 0, 0.38)"
  },
  "switch-cover": {
    "width": "100",
    "height": "50",
    "borderRadius": "50",
    "transform": "scale(1.2)",
    "backgroundColor": "#f2f2f2"
  }
}

/***/ }),

/***/ 371:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

var animation = weex.requireModule('animation');
var theme = __webpack_require__(287);
module.exports = {
  model: {
    prop: 'value'
  },
  props: {
    value: { default: false }
  },

  data: function data() {
    return {};
  },

  components: {},
  created: function created() {},

  methods: {
    doSwitch: function doSwitch() {
      this.value = !this.value;
      var scale = this.value ? 0 : 1.2;
      var translateX = this.value ? -2 : -46;
      animation.transition(this.$refs.cover, {
        styles: {
          transform: 'scale(' + scale + ')'
        },
        duration: 500, // ms
        timingFunction: 'ease',
        needLayout: false,
        delay: 0 // ms
      }, function () {});
      animation.transition(this.$refs.handler, {
        styles: {
          transform: 'translateX(' + translateX + ')',
          backgroundColor: this.value ? theme.brand.primary : '#fff'
        },
        duration: 500, // ms
        timingFunction: 'ease',
        needLayout: false,
        delay: 0 // ms
      }, function () {});
      this.$emit('input', this.value);
      this.$emit('change', this.value);
    }
  }
};

/***/ }),

/***/ 372:
/***/ (function(module, exports) {

module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  return _c('div', {
    class: ['switch', 'switch-' + _vm.size],
    on: {
      "click": function($event) {
        _vm.doSwitch()
      }
    }
  }, [_c('div', {
    ref: "cover",
    staticClass: ["switch-cover"]
  }), _c('div', {
    ref: "handler",
    staticClass: ["switch-handler"]
  }, [_c('div', {
    staticClass: ["switch-handler-circle"]
  })])])
},staticRenderFns: []}
module.exports.render._withStripped = true

/***/ }),

/***/ 488:
/***/ (function(module, exports, __webpack_require__) {

var __vue_exports__, __vue_options__
var __vue_styles__ = []

/* styles */
__vue_styles__.push(__webpack_require__(370)
)

/* script */
__vue_exports__ = __webpack_require__(371)

/* template */
var __vue_template__ = __webpack_require__(372)
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
if (
  typeof __vue_exports__.default === "object" ||
  typeof __vue_exports__.default === "function"
) {
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
__vue_options__ = __vue_exports__ = __vue_exports__.default
}
if (typeof __vue_options__ === "function") {
  __vue_options__ = __vue_options__.options
}
__vue_options__.__file = "/Users/lvling/workspace/米乐购/laxiaoke-app-mz/src/components/switch.vue"
__vue_options__.render = __vue_template__.render
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
__vue_options__._scopeId = "data-v-52445cbb"
__vue_options__.style = __vue_options__.style || {}
__vue_styles__.forEach(function (module) {
  for (var name in module) {
    __vue_options__.style[name] = module[name]
  }
})
if (typeof __register_static_styles__ === "function") {
  __register_static_styles__(__vue_options__._scopeId, __vue_styles__)
}

module.exports = __vue_exports__
module.exports.el = 'true'
new Vue(module.exports)


/***/ })

/******/ });